
import g from "../src/global";

export function Axios(method,url,data,thenFunc,params={},token='') {
    const axios =  require('axios');
    axios({
        method:method,
        url:url,
        headers: {
            "Content-Type": "multipart/form-data",
            'Authorization':'JWT '+ (token ? token :g.token),
        },
        withCredentials:true,
        data: data,
        params:  params
    }).then(thenFunc);
  }
   
